1. Field of Invention
This invention pertains to operation of target devices which store information on a storage media and which are connected to a SCSI bus, and particularly to the setting of buffer thresholds for such target devices.
2. Related Art and Other Considerations
For decades magnetic tape has been employed as a medium for storing information. Devices known as tape drives, tape decks, or tape recorders perform input and output operations, e.g., reading and recording operations, by transducing information from and to the tape. Information to be stored on a tape is obtained from a host device such as a computer. The information is transmitted from the host over a special connection or bus to the tape drive. Internally the tape drive has a buffer memory for storing information obtained from the host which the drive is not quite ready to record on the tape. When the information is ready to be recorded, the information passes through a write channel of the tape drive to a head. The head has gaps or other appropriate elements thereon which form magnetic flux transitions on the tape in the recording operation.
A reading operation for a tape drive is essentially the reverse of the recording operation. In the reading operation, the head detects magnetic flux transitions on the tape to obtain a read signal, processes the read signal in read circuitry, stores information ascertained from the read circuitry in the buffer, and ultimately transmits the information to a utilization device, e.g., the host, over the bus which connects the host and the tape drive.
One form of bus and interface connection between the host and tape drives has been standardized and is known as SCSI. The SCSI includes a SCSI controller integrated circuit (IC) which is resident in the tape drive and which is used to facilitate communications over a multi-bit SCSI bus. The SCSI bus includes data lines, power lines, ground lines, sensor lines, signaling lines, and control lines. The protocol for the SCSI bus is mandated by ANSI Standard X3.131-199x. The SCSI bus carries command description blocks (CDBs), two of the CDBs being data transfer from the host to the drive (data out) and data transfer from the drive to the host (data in). The time required for a CDB includes not only the time in which data is transferred, but also a certain overhead time.
When reading or recording (e.g., writing) data, a tape device can operate either as a streaming or start/stop tape device, depending on the data transfer rate of the host system. In the streaming mode the tape drive transfers data continuously (to tape or to the host) without stopping tape motion. In the start/stop mode, if the host system fails to transfer data to the tape drive quickly enough, the tape drive stops and restarts tape motion to accommodate a slow host transfer rate.
As mentioned above, tape drives typically have a memory known as a data buffer placed between the host system's data stream and the tape drive's recording and reading channels. In a recording operation, the level of data obtained from the host and transferred into the buffer must exceed a "motion" threshold before the tape drive initiates recording (e.g., movement of the tape and output of data through the recording channel). Similarly, in the recording operation, if the buffer is filling to rapidly with data from the host, the tape drive must stop receiving data from the host until the level of data in the buffer falls below a "reconnect" threshold. Conversely, in a reading operation, if the host can accept data from the tape drive's buffer faster than the tape drive can fill the buffer with data from the tape, the tape drive disconnects from the SCSI bus until the tape drive has filled its buffer back up to a level equal to the reconnect threshold. If, in a read operation, the tape drive fills the buffer with data from the tape, the tape drive must stop the tape and wait for the host to accept enough data to empty the buffer to the motion threshold, so that the tape drive can again start movement of the tape. Proper settings of the motion threshold and reconnect threshold can make a data buffer appear much larger than it really is, but improper settings have exactly the opposite effect.
Calculations for determination of static motion and reconnect thresholds were proposed in connection with a particular tape drive, i.e., an 8 mm helical scan tape drive model EXB-8500 marketed by Exabyte Corporation, in a document entitled "Setting The Motion and Reconnect Thresholds". That document sought to provide a tape drive operator with an approach for a one-time determination of the motion and reconnect thresholds. According to this static approach, a constant effective transfer rate for the tape drive/host combination was determined. By comparison with standard motion and reconnect thresholds for a 500 Kbyte/second transfer rate, the operator was to use the calculated constant effective transfer rate to adjust the static motion and reconnect thresholds of his particular drive.
Determination of static motion and reconnect thresholds as described above involved numerous assumptions and, as mentioned, resulted from a calculation of a constant effective transfer rate. For example, an assumption would have to be made regarding the size of blocks and the number of blocks transferred per CDB. Moreover, it was assumed that command overhead was a constant (i.e., fifteen milliseconds per CDB). Not only were the assumptions static, but other complicating factors were not considered. For example, the effective transfer rate cannot be considered constant when the drive employs data compression and there are variations in data compression ratios. Moreover, a SCSI bus can connect more than one host and one tape drive. As many as eight devices--at least one host and at least one drive--can be connected to a SCSI bus. When the connections of hosts and drives to a SCSI bus are changing, the data transfer rate to a particular drive is radically affected. These factors render static determinations of motion and reconnect thresholds less reliable and unrealistic.
As understood from the foregoing, inaccurately set motion and reconnect thresholds increase the number of tape start and stop operations. Increases in the number of tape start and stop operations not only decreases the tape drive's overall throughput and efficiency, but also increases wear of the drive's mechanical components and of the tape.
According, what is needed, and an object of the present invention, is dynamic motion and reconnect threshold management for a tape drive.